package yangningRabbitMQ.WorkQueue.Listener;


import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class WorkQueueListener {

    @RabbitListener(queues = "work.queue")
    public void listenWorkQueue1(String message) {
        log.info("消费者1接收到信息：【{}】", message);
    }
    @RabbitListener(queues = "work.queue")
    public void listenWorkQueue2(String message) {
        log.info("消费者2接收到信息：【{}】", message);
    }
}
